import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import RequirementForm from '@/pages/RequirementForm.vue'
import ChatPage from '@/pages/ChatPage.vue'

// 定义路由配置
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'home',
    redirect: '/requirement'
  },
  {
    path: '/requirement',
    name: 'requirement',
    component: RequirementForm,
    meta: {
      title: '需求提交 - AI营销方案生成系统'
    }
  },
  {
    path: '/chat',
    name: 'chat',
    component: ChatPage,
    meta: {
      title: 'AI对话 - AI营销方案生成系统',
      requiresRequirement: true
    }
  },

]

// 创建路由实例
const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
